﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Weblications.Sango.Controller;

namespace Pixysoft.Weblications.Sango.Thread
{
    class ThreadManager
    {
        static RveStageThread rveThread = new RveStageThread();

        static RvrSectionThread rvrThread = new RvrSectionThread();

        static OfficerUpgradeThread officerThread = new OfficerUpgradeThread();


        public static void Register()
        {
            LoggerHelper.Info("register thread : rve stage thread.");

            ThreadPoolController.Register(rveThread, null, RveStageThread.interval, false);

            LoggerHelper.Info("register thread : rvr section thread.");

            ThreadPoolController.Register(rvrThread, null, RvrSectionThread.interval, false);

            LoggerHelper.Info("register thread : officer upgrade thread.");

            ThreadPoolController.Register(officerThread, null, OfficerUpgradeThread.interval, false);
        }

        public static void Unregister()
        {
            ThreadPoolController.Unregister(rveThread);

            ThreadPoolController.Unregister(rvrThread);

            ThreadPoolController.Unregister(officerThread);
        }
    }
}
